Bloom Filter
Very memory efficient compared with storing all keys directly.
False positive: possible.
False negative: not expected for correctly inserted entries in a standard Bloom Filter.
Cannot normally remove individual entries safely without a counting variant.
Useful as a cache-penetration guard before querying an expensive database.
Useful for spell checking, URL filtering, deduplication, and membership prechecks.
The false-positive rate depends on bit-array size, number of hash functions, and number of inserted elements.
We need to quickly reject duplicate user IDs before processing them. How would you use a Bloom filter for this task?
If we accidentally add more elements than the filter was sized for, what happens to the false‑positive rate?
What would be the impact on our cache‑miss handling if the Bloom filter returns a false positive?
Our spell‑check service uses a Bloom filter to filter out non‑dictionary words before hitting the DB, but latency increased after a data load. Walk me through how you'd debug the issue.
Explain the trade‑offs between false‑positive rate and memory when sizing a Bloom filter to protect a high‑traffic API from cache penetration.
We tried to delete entries from the Bloom filter after a TTL expires and started seeing unexpected false positives. Why does this happen and how would you handle it?
Design a distributed caching layer that guards against cache penetration using Bloom filters. Discuss sharding, consistency, and scaling to billions of keys.
After a rolling upgrade, our system saw a spike in Bloom filter false positives. What could cause this and how would you mitigate it?
Compare using a Bloom filter versus a Redis set for deduplication in a streaming pipeline, focusing on latency, memory usage, and correctness.
We have a legacy monolith with a custom hash table for request deduplication and want to migrate to Bloom‑filter‑based guards across multiple microservices. Outline the migration plan, including backward compatibility, monitoring, and failure modes.
At a company‑wide level, how would you decide whether to standardize Bloom filters for all cache‑penetration scenarios versus per‑service implementations? Discuss governance, observability, and technical debt.
A global CDN wants to use Bloom filters to block malicious URLs before edge caching. What architectural challenges arise (e.g., synchronization, false‑positive impact on user experience) and how would you address them?